#ifndef TEST_H
#define TEST_H

#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
#include <iterator>
#include <numeric>

class test {
public:
  test();
  test(double v);
  test(int dim, size_t shape[], double data[]);

  int get_dim() const;
  size_t getTotalSize() const;
  std::vector<double>& get_data_vec();

  size_t *get_shape_array();
  double *get_data_array();

  friend std::ostream& operator<<(std::ostream& os, const test& t);

  friend test operator+(const test &lhs, const test &rhs);
  friend test operator-(const test &lhs, const test &rhs);
  friend test operator*(const test &lhs, const test &rhs);
   
  friend test ReLU(const test &x);
  friend test Flatten(const test &x);
  friend test Inut2d(const test &x);
  friend test Linear(const test &w, const test &x, const test &b);
  friend test MaxPool2d(const test &x, const int kernel_size, const int stide);
  friend test Conv2d(const test &x, const int in_channels, const int out_channels, const int kernel_size, const test &w, const test &b);
  
  template <class T>
  friend test helper(const test &lhs, const test &rhs);

private:
  std::vector<size_t> test_value;
  std::vector<double> test_double_data;
};

#endif
